#include <cstdio>
using namespace std;

#define STUDENT_NUMBER 5
#define CLASS_NUMBER 3
#define NAME_LENGTH 19

int main()
{
    typedef struct {
        int num;
        char name[NAME_LENGTH + 1];
        int score[CLASS_NUMBER];
    } student;

    student student_list[STUDENT_NUMBER];
    for (int i = 0; i < STUDENT_NUMBER; i++) {
        scanf(" %d", &student_list[i].num);
        scanf(" %s", student_list[i].name);
        for (int j = 0; j < CLASS_NUMBER; j++)
            scanf(" %d", &student_list[i].score[j]);
    }

    for (int i = 0; i < STUDENT_NUMBER; i++) {
        printf("%d %s ", student_list[i].num, student_list[i].name);
        for (int j = 0; j < CLASS_NUMBER; j++)
            printf("%d ", student_list[i].score[j]);
        printf("\n");
    }

    return 0;
}